<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
	pageContext.setAttribute("a", 1);   // 当前页面
	request.setAttribute("b",2);        // 自己和转发页面
	session.setAttribute("c", 3);       // 一次会话
	application.setAttribute("d", 4);   // 整个服务器
	
	//转发到7.jsp
	request.getRequestDispatcher("/7.jsp").forward(request,response);
%>

<%
	out.print(pageContext.getAttribute("a"));
	out.print(request.getAttribute("b"));
	out.print(session.getAttribute("c"));
	out.print(application.getAttribute("d"));
%>

</body>
</html>